<?php
/* 
 * @Package Softpin Order Manager
 * @Subpackage : simbuy Manager
 */
// no direct access
defined('_JEXEC') or die('Truy nhập không hợp lệ');
date_default_timezone_set('Asia/Ho_Chi_Minh');
// Set the table directory
JTable::addIncludePath(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_simbuy'.DS.'tables');
// include proper controller class
$controllerName = JRequest::getCmd('controller');
// Auto detect if the controller name is same view name, use this controller

if ($controllerName == '') {
	$view = JRequest::getCmd('view');
	if ($view && file_exists(JPATH_COMPONENT.DS.'controllers'.DS.strtolower($view).'.php'))
		$controllerName = $view;
}                     
$path = $controllerName 
	? JPATH_COMPONENT.DS.'controllers'.DS.strtolower($controllerName).'.php' 
	: JPATH_COMPONENT.DS.'controller.php';
if (!file_exists($path))
	$path = JPATH_COMPONENT.DS.'controller.php';
	
require_once $path;

$className = "SimbuyController$controllerName";
$controller = new $className();
$controller->execute( JRequest::getVar( 'task' ) );
$controller->redirect();


















